//
// Created by Felix on 24-4-24.
//

#ifndef GAZE_USERMODEL_HPP
#define GAZE_USERMODEL_HPP

#include "oatpp/core/Types.hpp"
#include "oatpp/core/macro/codegen.hpp"

#include "enum/Role.hpp"

#include OATPP_CODEGEN_BEGIN(DTO)

class UserModel : public oatpp::DTO {

    DTO_INIT(UserModel, DTO)

    DTO_FIELD(Int32, id); //
    DTO_FIELD(String, username); //
    DTO_FIELD(String, password); //
    DTO_FIELD(String, avatar); //
    DTO_FIELD(Enum<Role>::AsString, role); //
    DTO_FIELD(Int8, status); //
    DTO_FIELD(Int64, createTime, "create_time"); //
    DTO_FIELD(Int64, updateTime, "update_time"); //
    DTO_FIELD(Int64, deleteTime, "delete_time"); //
};

#include OATPP_CODEGEN_END(DTO)

#endif //GAZE_USERMODEL_HPP
